AO3-1173 We need a comment preview#5835
Conversation
|
thoughts (as a fellow contributor):
is there a reason it couldn't be sent as POST request params, like when you're previewing it? also i just checked how dreamwidth does it, and it actually has both the comment preview and the edit form on the preview page. that's maybe an even better alternative to jumping between different pages?
that would make total sense to do, you could call it
i don't see any any |
…in the git compare so im pushing
i also just noticed that the dreamwidth comment preview page also has a copy of whatever post or comment you're replying to... not sure if livejournal's previews that sarken mentioned are the same but i suppose you could also just use javascript by default to fetch the preview and insert it somewhere in or near the comment form, and only fall back to a separate page without it |
|
@slavalamp Hi! Thanks for the feedback. I'll definitely look into a preview that includes the comment one is replying to if one exists. I am also willing to workshop the actual design of the preview page. One thing to note, though, is that the request (and, from what I understand, AO3 in general) asked for JavaScript-based features to be avoided. If it didn't, I would have approached all of this completely differently. So, with that in mind, we are certainly more limited on what can be done. That being said, I think having the preview and the edit form on the same page makes sense. I was trying to imitate the work preview flow, but I think since comments are generally shorter, having them on the same page is more reasonable. I'll also start working on showing the parent comment alongside the preview comment; that's a great idea, and I think it should be possible to implement. I also mentioned creating a comment template for this and other features, but I think I decided to do that in a different PR, so this doesn't become too bloated a change. I'll also probably revert my |
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-1173
Purpose
This change adds a JavaScript-free "comment preview" (similar to work previews) for the commenting system. It should display the parsed HTML in a similar template to how the comment would actually be displayed. It preserves the body/info of the comment, as well as the user info between pages, allowing a user to edit the details until it looks right.
I would like some feedback on a few things:
sessionStorageand its ilk are out of the question, and I'm not sure we want to implement any comment draft system on the backend.text-align: right. I hate how this rule looks, but I'm not sure if we have any better practices for the naming/style rule conventions I can take advantage of here.Testing Instructions
I will update the Jira ticket once this code looks close to being ready to merge; until then I want to wait until the flow is solidified and approved.
Credit
calm (they/them)